import request from '@/utils/request'

// 查询最热书籍列表
export function listPopularBook(query) {
  return request({
    url: '/show/popularBook/list',
    method: 'get',
    params: query
  })
}

// 查询最热书籍详细
export function getPopularBook(id) {
  return request({
    url: '/show/popularBook/' + id,
    method: 'get'
  })
}

// 新增最热书籍
export function addPopularBook(data) {
  return request({
    url: '/show/popularBook',
    method: 'post',
    data: data
  })
}

// 修改最热书籍
export function updatePopularBook(data) {
  return request({
    url: '/show/popularBook',
    method: 'put',
    data: data
  })
}

// 删除最热书籍
export function delPopularBook(id) {
  return request({
    url: '/show/popularBook/' + id,
    method: 'delete'
  })
}
